package com.blockmeta.bbs.immodule.widget.msgview;

import android.content.Context;
import android.widget.TextView;

import com.blockmeta.bbs.immodule.R;
import com.blockmeta.bbs.immodule.bean.IMCommonLib;
import com.blockmeta.bbs.immodule.dao.ChatMessage;
import com.chad.library.adapter.base.BaseViewHolder;

public class UnsupportMsgView<T extends ChatMessage> extends MsgView<T>{

    public UnsupportMsgView(Context context) {
        super(context);
    }

    @Override
    public int getLayoutId() {
        return R.layout.im_chat_detail_text;
    }

    @Override
    public void convert(BaseViewHolder helper, T item, T lastItem) {
        super.convert(helper, item, lastItem);
        super.bindCommonControl(helper, item, lastItem);

        //发送消息！
        if (item.getType() == ChatMessage.TYPE_SEND) {
            TextView textView = helper.getView(R.id.tv_right_content);
            IMCommonLib.fillContent(textView, "当前版本不支持该消息", mContext);
            helper.addOnLongClickListener(R.id.tv_right_content);
        } else {
            //接收消息
            TextView textView = helper.getView(R.id.tv_left_content);
            IMCommonLib.fillContent(textView, "当前版本不支持该消息", mContext);
            helper.addOnLongClickListener(R.id.tv_left_content);
        }
    }



}
